all: portscan.o portscan_wrap.o _portscan.so
	
portscan.o: portscan.c
	gcc -c -fPIC portscan.c

portscan_wrap.c: portscan.c portscan.i
	swig -python portscan.i

portscan_wrap.o: portscan_wrap.c
	gcc -c -fPIC portscan_wrap.c -I/usr/include/python2.7

_portscan.so: portscan.o portscan_wrap.o
	gcc -shared portscan_wrap.o portscan.o -lm \-I/usr/include/python2.7 -o _portscan.so
clean:
	rm *.o *.so
